package cn.bobohost.crmrbac.service;

import cn.bobohost.crmrbac.pojo.po.Department;
import cn.bobohost.crmrbac.pojo.query.QueryObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 部门的业务层接口
 */
public interface DepartmentService extends IService<Department> {

    /**
     * 查询所有
     * @return
     */
    List<Department> findDepartmentList();

    /**
     * 保存一个部门
     * @param department
     */
    void saveDepartment(Department department);

    /**
     * 保存或更新一个部门
     * @param department
     */
    void saveOrUpdateDepartment(Department department);

    /**
     * 根据分页信息查询出分页结果
     * @param page
     * @return
     */
    IPage<Department> findDepartmentListPage(IPage page);

    public PageInfo<Department> findDepartmentListPageByPageHelper(QueryObject queryObject);
}
